<template>
  <div>
    <div class="baseInformation" v-if='dispalyBase || dispalyBaseInfo'>
      <el-card class="box-card">
        <div>{{ companyName }} <el-tag>标签一</el-tag></div>
        <div class="baseInfo">客户基本信息</div>
        <template>
          <el-table :data="tableData" style="width: 80%">
            <el-table-column prop="areaName" label="所属省份" width="180">
            </el-table-column>
            <el-table-column prop="creditCode" label="税号" width="200">
            </el-table-column>
            <el-table-column prop="registerDate" label="成立日期">
            </el-table-column>
            <el-table-column prop="yearsDiff" label="成立时长">
            </el-table-column>
            <el-table-column prop="legalPerson" label="法人">
            </el-table-column>
            <el-table-column prop="phone" label="联系方式">
            </el-table-column>
          </el-table>
        </template>
        <div class="matchingProcess baseInfo">匹配流程</div>
        <el-steps id="elStepsStyle" ref="elStepsRef" class="baseInfo" :space="200" :active="activeStatus">
          <el-step title="税务数据匹配"></el-step>
          <el-step title="征信录入"></el-step>
          <el-step title="征信数据匹配"></el-step>
          <el-step title="客服沟通"></el-step>
          <el-step title="沟通结果匹配"></el-step>
        </el-steps>
      </el-card>
    </div>
    <div class="matchingInput">
      <el-card>
        <div class="baseInfo" v-if='dispalyBase'>产品匹配条件沟通</div>
        <el-form v-if='dispalyBase' ref="form" :model="formData" label-width="150px">
          <el-form-item label="申请人资质条件">
            <el-select v-model="formData.personCondition" allow-create filterable multiple placeholder="请选择"
              style="width: 680px;">
              <el-option v-for="item in person_condition" :key="item.value" :label="item.label" :value="item.value" />
            </el-select>
            <el-tooltip class="item" effect="dark" content="询问申请人资质条件时，可根据选项内容询问" placement="bottom-start">
              <i class="el-icon-question"></i>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="经营条件">
            <el-select v-model="formData.business_scale" allow-create filterable multiple placeholder="请选择"
              style="width: 680px;">
              <el-option v-for="item in mange_cont" :key="item.value" :label="item.label" :value="item.value" />
            </el-select>
            <el-tooltip class="item" effect="dark" content="询问经营条件时，可根据选项内容询问，超出" placement="bottom-start">
              <i class="el-icon-question"></i>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="经营规模">
            <el-select v-model="formData.scaleOperation" allow-create filterable multiple placeholder="请选择"
              style="width: 680px;">
              <el-option v-for="item in business_scale" :key="item.value" :label="item.label" :value="item.value" />
            </el-select>
            <el-tooltip class="item" effect="dark" content="Bottom Left 提示文字" placement="bottom-start">
              <i class="el-icon-question"></i>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="企业贷款笔数">
            <el-input v-model="formData.enterLoanCount" type="number" min='0' oninput="if(value<0)value=0"
              style="width: 680px;"></el-input>
          </el-form-item>
          <el-form-item label="企业贷款机构">
            <el-input v-model="formData.enterLoanMechCount" type="number" min='0' oninput="if(value<0)value=0"
              style="width: 680px;"></el-input>
          </el-form-item>
          <el-form-item label="资产负债率">
            <el-input v-model="formData.assetDeptRate" type="number" min='0' oninput="if(value<0)value=0"
              style="width: 680px;">
              <i slot="suffix">%</i>
            </el-input>
            <el-tooltip class="item" effect="dark" content="资产负债率=总负债/总资产" placement="bottom-start">
              <i class="el-icon-question"></i>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="手机号在网时长">
            <el-input v-model="formData.phoneOnline" type="number" min='0' oninput="if(value<0)value=0"
              style="width: 680px;">
              <i slot="suffix">月</i>
            </el-input>
          </el-form-item>
          <el-form-item label="手机号是否实名认证">
            <el-radio-group v-model="formData.phoneReal">
              <el-radio label='1'>是</el-radio>
              <el-radio label='0'>否</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="公积金缴纳">
            <el-input v-model="formData.reserveFundMonth" type="number" min='0' oninput="if(value<0)value=0"
              style="width: 680px;">
              <i slot="suffix">月</i>
            </el-input>
          </el-form-item>
          <el-form-item label="社保缴纳">
            <el-input v-model="formData.socialSecurityMonth" type="number" min='0' oninput="if(value<0)value=0"
              style="width: 680px;">
              <i slot="suffix">月</i>
            </el-input>
          </el-form-item>
          <el-form-item label="资产证明">
            <el-select v-model="formData.assets" allow-create filterable multiple placeholder="请选择"
              style="width: 680px;">
              <el-option v-for="item in asset_proof" :key="item.value" :label="item.label" :value="item.value" />
            </el-select>
            <el-tooltip class="item" effect="dark" content="例如：宅基地证、林权证、商品房证、购房合" placement="bottom-start">
              <i class="el-icon-question"></i>
            </el-tooltip>
          </el-form-item>
          <el-form-item label="证书专利">
            <el-select v-model="formData.certificate" allow-create filterable multiple placeholder="请选择"
              style="width: 680px;">
              <el-option v-for="item in certificate_patent" :key="item.value" :label="item.label" :value="item.value" />
            </el-select>
            <el-tooltip class="item" effect="dark" content="例如：“专精特新”证书、医疗机构职业许可" placement="bottom-start">
              <i class="el-icon-question"></i>
            </el-tooltip>
          </el-form-item>
          <div class="baseInfo">客服沟通结果</div>
          <el-form-item label="沟通标签">
            <el-radio-group v-model="formData.customerTag">
              <el-radio label="1">关机</el-radio>
              <el-radio label="2">不需要</el-radio>
              <el-radio label="3">需要回拨</el-radio>
              <el-radio label="4">停机</el-radio>
              <el-radio label="5">不方便接</el-radio>
              <el-radio label="6">沟通成功</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="客户情况">
            <el-input type="textarea" v-model="formData.clientStatus" maxlength="200" show-word-limit
              style="width: 680px;margin: 0;"></el-input>
          </el-form-item>
          <el-form-item label="备注">
            <el-input type="textarea" v-model="formData.remark" maxlength="200" show-word-limit
              style="width: 680px;margin: 0;"></el-input>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="onSubmit">保存</el-button>
            <el-button v-if="productMatchingS" @click="productMatching">匹配产品</el-button>
          </el-form-item>
        </el-form>
        <!-- 数据回显展示详情 -->
        <div v-if="flagCtr" class="message-box">
          <div style="margin-bottom: 50px;">产品匹配条件沟通</div>
          <el-form :model="formDataDetails" size="small" label-width="170px" style="margin-top: 20px" ref="formRef">
            <el-row>
              <el-col :span="12">
                <div style="width: 656px;height: 56px;padding-top:14px;background: #F5F5F5;">
                  <el-form-item label="申请人资质条件：">
                    <span style="color: #000">{{ formDataDetails.personCondition || '-' }}</span>
                  </el-form-item>
                </div>
              </el-col>
              <el-col :span="12">
                <div style="width: 656px;height: 56px;padding-top:14px;background: #F5F5F5;">
                  <el-form-item label="经营条件：">
                    <el-tooltip :content="formDataDetails.scaleOperation">
                      <div style="overflow: hidden;text-overflow:ellipsis;white-space: nowrap;">{{ formDataDetails.scaleOperation || '-' }}</div>
                    </el-tooltip>
                  </el-form-item>
                </div>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="12">
                <div style="width: 656px;height: 56px;padding-top:14px;">
                  <el-form-item label="企业贷款笔数：">
                    <span>{{ formDataDetails.enterLoanCount || '-' }}笔</span>
                    <span style="color: #000"></span>
                  </el-form-item>
                </div>
              </el-col>
              <el-col :span="12">
                <div style="width: 656px;height: 56px;padding-top:14px;">
                  <el-form-item label="企业贷款机构：">
                    <span>{{ formDataDetails.enterLoanMechCount || '-' }}</span>
                  </el-form-item>
                </div>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="12">
                <div style="width: 656px;height: 56px;padding-top:14px;background: #F5F5F5;">
                  <el-form-item label="资产负债率：">
                    <span>{{ formDataDetails.assetDeptRate || '-' }}%</span>
                  </el-form-item>
                </div>
              </el-col>
              <el-col :span="12">
                <div style="width: 656px;height: 56px;padding-top:14px;background: #F5F5F5;">
                  <el-form-item label="手机号在网时长：">
                    <span>{{ formDataDetails.phoneOnline || '-' }}月</span>
                  </el-form-item>
                </div>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="12">
                <div style="width: 656px;height: 56px;padding-top:14px;">
                  <el-form-item label="手机号是否实名认证：">
                    <span>{{ formDataDetails.phoneReal === 0 ? '否' : '是' }}</span>
                  </el-form-item>
                </div>
              </el-col>
              <el-col :span="12">
                <div style="width: 656px;height: 56px;padding-top:14px;">
                  <el-form-item label="公积金纳税：">
                    <span>{{ formDataDetails.reserveFundMonth || '-' }}个月</span>
                  </el-form-item>
                </div>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="12">
                <div style="width: 656px;height: 56px;padding-top:14px;background: #F5F5F5;">
                  <el-form-item label="社保缴纳：">
                    <span>{{ formDataDetails.socialSecurityMonth || '-' }}个月</span>
                  </el-form-item>
                </div>
              </el-col>
              <el-col :span="12">
                <div style="width: 656px;height: 56px;padding-top:14px;background: #F5F5F5;">
                  <el-form-item label="资产证明：">

                    <el-tooltip :content="formDataDetails.assets">
                      <div style="overflow: hidden;text-overflow:ellipsis;white-space: nowrap;">{{ formDataDetails.assets|| '-' }}</div>
                    </el-tooltip>
                    <!-- <span>{{ formDataDetails.assets || '-' }}</span><span style="color: #000"></span> -->
                  </el-form-item>
                </div>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="12">
                <div style="width: 656px;height: 56px;padding-top:14px;">
                  <el-form-item label="证书专利：">
                    <span>{{ formDataDetails.certificate || '-' }}</span>
                  </el-form-item>
                </div>
              </el-col>
              <el-col :span="12">
                <div style="width: 656px;height: 56px;padding-top:14px;">
                  <el-form-item label="经营规模">

                    <el-tooltip :content="formDataDetails.business_scale">
                      <div style="overflow: hidden;text-overflow:ellipsis;white-space: nowrap;">{{ formDataDetails.business_scale|| '-' }}</div>
                    </el-tooltip>
                  </el-form-item>
                </div>
              </el-col>
            </el-row>
            <div>客服沟通结果</div>
            <el-form-item label="沟通标签">
              <el-radio-group v-model="formDataDetails.customerTag" disabled>
                <el-radio label="1">关机</el-radio>
                <el-radio label="2">不需要</el-radio>
                <el-radio label="3">需要回拨</el-radio>
                <el-radio label="4">停机</el-radio>
                <el-radio label="5">不方便接</el-radio>
                <el-radio label="6">沟通成功</el-radio>
              </el-radio-group>
            </el-form-item>
            <el-form-item label="客户情况">
              <el-input type="textarea" v-model="formDataDetails.clientStatus" disabled
                style="width: 680px;margin: 0;"></el-input>
            </el-form-item>
            <el-form-item label="备注">
              <el-input type="textarea" v-model="formDataDetails.remark" disabled
                style="width: 680px;margin: 0;"></el-input>
            </el-form-item>
          </el-form>
        </div>
      </el-card>
    </div>
    <div class="CustomerServiceResult">
      <div ref="developPlan" v-if='CustomerServiceResult'>
        <el-card class="box-card">
          <div slot="header" class="clearfix">出产品可贷额度</div>
          <div>
            <developPlanCustomer :matchStatus="matchStatus" searchType="1" @saveStatus='saveStatus' ref="developPlanPage" :goback="goback"
              :detailInfo="detailInfo">
            </developPlanCustomer>
          </div>
        </el-card>
      </div>
    </div>
  </div>
</template>
<script>
import { getCustomerService, saveCustomerService, getCustomerInfoService, getMatchProductStatus } from "@/api/customerService";
import { getDictData, dictTypeFunList } from "@/utils/dict";
import developPlanCustomer from "./developPlanCustomer.vue";
import { saveQuota } from "@/api/customer";
import jsx from "babel-plugin-syntax-jsx";
export default {
  name: "communication",
  components: {
    developPlanCustomer
  },
  props: {

  },
  data() {
    return {
      tableData: [],
      formData: {
        region: [],
        name: '',
        resource: '',
        desc: '',
        phoneReal: '0',
        customerTag: '6',
        enterLoanCount: '',
        enterLoanMechCount: '',
        assetDeptRate: '',
        phoneOnline: '',
        phoneReal: '',
        reserveFundMonth: '',
        socialSecurityMonth: '',
        assets: '',
        certificate: '',
        clientStatus: '',
        remark: '',
        scaleOperation: ''
      },
      formDataDetails: {
        personCondition: '',
        scaleOperation: '',
        business_scale: '',
        assets: '',
        assetDeptRate: '',
        certificate: '',
        certificate_patent: '',
        phoneReal: '0',
        reserveFundMonth: '',
        socialSecurityMonth: '',
        clientStatus: '',
        remark: '',
        customerTag: '',
        customerTagName: '',
        customerId: '',
        customerName: '',
        customerPhone: '',
        customerStatus: '',
        customerStatusName: '',
        customerType: '',
        customerTypeName: '',
        customerTypeId: '',
      },
      person_condition: [],
      mange_cont: [],
      business_scale: [],
      asset_proof: [],
      certificate_patent: [],
      activeStatus: 1,
      detailInfo: {},
      CustomerServiceResult: false,
      dispalyBase: true,
      flagCtr: false,
      dispalyBaseInfo: false,
      goback: false,
      productMatchingS: false,
      companyName:'',
      matchStatus: ''
    };
  },
  created() {
    if(this.$route.query.matchStatus) {
      this.matchStatus = this.$route.query.matchStatus
    }
    this.initSelect()
    console.log(this.$route.query.matchStatus);
  },
  mounted() {
    this.routerStatusInit()

  },
  methods: {
    onSubmit() {
      this.productMatchingS = false
      let params = {
        id: '',//主键
        matchId: this.$route.query.id,//匹配id
        matchType: this.$route.query.matchType,//匹配类型1企业2个体
        createBy: "",//创建人
        updateBy: "",//更新人
        createTime: "",
        updateTime: "",
        personCondition: JSON.stringify(this.formData.personCondition),//申请人资质条件1： 种植经验 2： 有相关土地经营权
        scaleOperation: JSON.stringify(this.formData.scaleOperation),//经营条件（多选）字典配置：1、纯种植面积100亩以上 2、种植，加工结合种植面积50亩以上，年加工产能10吨以上 3、无
        mangeCont: JSON.stringify(this.formData.business_scale),
        enterLoanCount: this.formData.enterLoanCount,//企业贷款笔数
        enterLoanMechCount: this.formData.enterLoanMechCount,//企业贷款机构
        assetDeptRate: this.formData.assetDeptRate,//资产负债率
        phoneOnline: this.formData.phoneOnline,//手机在网条件 ：法人手机号在网超一年：1；在网 6 个月以上：2
        phoneReal: this.formData.phoneReal,//是否实名认证
        reserveFundMonth: this.formData.reserveFundMonth,//公积金缴纳
        socialSecurityMonth: this.formData.socialSecurityMonth,//社保缴纳
        assets: JSON.stringify(this.formData.assets),//资产证明：宅基地证原件：1；林权证原件：2；商品房产证原件：3；购房合同原件：4；个人存单原件：5；个人存单原件：6；机动车登记证：7；
        certificate: JSON.stringify(this.formData.certificate),//证书专利：有专精特新证书：1；医疗机构职业许可证：2；
        customerTag: this.formData.customerTag,//沟通标签
        clientStatus: this.formData.clientStatus,//客户情况
        remark: this.formData.remark,//备注
        enterOverdue: "",//企业逾期条件
        // mangeCont: ""//企业逾期条件
      }
      saveCustomerService(params).then(res => {
       if(res.code==200){
        this.$message({
          message: '保存成功',
          type: 'warning'
        })
       }
      });
      let obj = {
        personCondition: JSON.stringify(this.formData.personCondition),//申请人资质条件1： 种植经验 2： 有相关土地经营权
        scaleOperation: JSON.stringify(this.formData.scaleOperation),//经营条件（多选）字典配置：1、纯种植面积100亩以上 2、种植，加工结合种植面积50亩以上，年加工产能10吨以上 3、无
        mangeCont: JSON.stringify(this.formData.business_scale),
        assets: JSON.stringify(this.formData.assets),//资产证明：宅基地证原件：1；林权证原件：2；商品房产证原件：3；购房合同原件：4；个人存单原件：5；个人存单原件：6；机动车登记证：7；
        certificate: JSON.stringify(this.formData.certificate),//证书专利：有专精特新证书：1；医疗机构职业许可证：2；
        enterLoanCount: this.formData.enterLoanCount,//企业贷款笔数
        enterLoanMechCount: this.formData.enterLoanMechCount,//企业贷款机构
        assetDeptRate: this.formData.assetDeptRate,//资产负债率
        phoneOnline: this.formData.phoneOnline,//手机在网条件 ：法人手机号在网超一年：1；在网 6 个月以上：2
        phoneReal: this.formData.phoneReal,//是否实名认证
        reserveFundMonth: this.formData.reserveFundMonth,//公积金缴纳
        socialSecurityMonth: this.formData.socialSecurityMonth,//社保缴纳
      }
      let i = 0;
      Object.values(obj).forEach((items, index) => {
        if (index < 5) {
          items = JSON.parse(items)
        }
        if (items.length > 0||(typeof(items)==='number')) {
          i = i + 1
        }
      })
      if (i > 4) {
        this.productMatchingS = true
      } 
    },
    //产品匹配
    productMatching() {
      let params = {
        id: this.$route.query.id,
        type: this.$route.query.matchType,
        matchStep: 3
      }
      getMatchProductStatus(params).then(res => {
        if (res.data.status !== 'MatchCustomerFailed') {
          // this.detailInfo = {
          //   matchType: this.$route.query.matchType,
          //   matchId: this.$route.query.id,
          //   matchStep: '3'
          // }
          // this.CustomerServiceResult = true
          // this.flagCtr=true,
          // this.dispalyBase = false
          this.$router.back();
        } else {
          this.$message({
            message: '匹配失败',
            type: "warning"
          });
        }
      });
    },
    //提交
    saveStatus(val) {
      this.dispalyBase = false
      this.open()
    },
    //弹框二次确认
    open() {
      this.$confirm('请确认可贷额度是否精准，点击确认后系统 会把推荐产品推送给用户', '系统方案', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
        center: true
      }).then(() => {
        let recommendedProducts = this.$refs.developPlanPage.recommendedProducts;
        if (recommendedProducts.length > 0) {
        let list = recommendedProducts.map(item => {
          return {
            id: item.id,
            quota: item.quota
          };
        });
        let newData = this.$route.query
        let params = {
          id: newData.id,
          type: newData.matchType,
          matchStep: newData.matchStep,
        }
        saveQuota(params).then(res => {
          if (res.code === 200) {
            this.$message({
              message: "保存成功",
              type: "success"
            });
            setTimeout(() => {
              // this.dispalyBase=true;
              this.flagCtr = true
                this.dispalyBaseInfo = true
                this.goback = true
                this.init()

            }, 1000);
          }
        });
      }
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消'
        });
      });
    },
    //拼配产品映射
    init() {
      dictTypeFunList(this.formData.personCondition, "person_condition").then((res) => {
        this.formDataDetails.personCondition = res.join(',')
      });
      //经营条件
      dictTypeFunList(this.formData.scaleOperation, "mange_cont").then((res) => {
        this.formDataDetails.scaleOperation = res.join(',')
      });
      //经营规模
      dictTypeFunList(this.formData.business_scale, "business_scale").then((res) => {
        this.formDataDetails.business_scale = res.join(',')
      });
      //资产证明
      console.log('111111111',this.formData.assets);
      dictTypeFunList(this.formData.assets, "asset_proof").then((res) => {
        this.formDataDetails.assets = res.join(',')
        console.log(' this.formDataDetails.assets', this.formDataDetails.assets);
      });
      //证书专利
      dictTypeFunList(this.formData.certificate, "certificate_patent").then((res) => {
        this.formDataDetails.certificate = res.join(',')
      });
      this.formDataDetails.enterLoanCount = this.formData.enterLoanCount
      this.formDataDetails.enterLoanMechCount = this.formData.enterLoanMechCount
      this.formDataDetails.assetDeptRate = this.formData.assetDeptRate
      this.formDataDetails.phoneOnline = this.formData.phoneOnline
      this.formDataDetails.phoneReal = this.formData.phoneReal
      this.formDataDetails.reserveFundMonth = this.formData.reserveFundMonth
      this.formDataDetails.socialSecurityMonth = this.formData.socialSecurityMonth
      this.formDataDetails.customerTag = this.formData.customerTag
      this.formDataDetails.clientStatus = this.formData.clientStatus
      this.formDataDetails.remark = this.formData.remark
    },
    //初始化下拉列表
    initSelect() {
      let routerObj = this.$route.query
      this.companyName=routerObj.enterpriseName
      let params = {
        matchId: routerObj.id,
        matchType: routerObj.matchType
      };
      // 查询产品匹配条件沟通数据
      getDictData("person_condition").then((res) => {
        this.person_condition = res
      });
      //经营条件
      getDictData("mange_cont").then((res) => {
        this.mange_cont = res
      });
      //经营规模
      getDictData("business_scale").then((res) => {
        this.business_scale = res
      });
      //资产证明
      getDictData("asset_proof").then((res) => {
        this.asset_proof = res
      });
      //证书专利
      getDictData("certificate_patent").then((res) => {
        this.certificate_patent = res
      });

      // 查询客服基本信息
      getCustomerInfoService(params).then(res => {
        this.tableData = [res.data]
        this.activeStatus = Number(res.data.processStatus)
        console.log('客服基本信息', res);
      });
    },
    //根据点击状态控制显示模块
    routerStatusInit() {
      let routerObj = this.$route.query
      let params = {
        matchId: routerObj.id,
        matchType: routerObj.matchType
      };
      let routerStatus = routerObj.contactStatus
     //客服沟通-详情
      if (routerStatus === '4') {
        this.flagCtr = true
        this.dispalyBase = false
        this.dispalyBaseInfo = true
        this.CustomerServiceResult = true
        this.goback = true
        // this.init()
      }
      //客服沟通-沟通成功
       if (routerStatus === '2') {
        this.flagCtr = true
        this.dispalyBase = false
        this.dispalyBaseInfo = true
        this.CustomerServiceResult = false
        this.goback = true
        // this.init()
      }
      getCustomerService(params).then(res => {
        this.formData.personCondition = JSON.parse(res.data.personCondition ? res.data.personCondition : '')
        this.formData.business_scale = JSON.parse(res.data.scaleOperation ? res.data.scaleOperation : '')//经营规模
        this.formData.scaleOperation = JSON.parse(res.data.mangeCont ? res.data.mangeCont : '')//经营条件
        this.formData.enterLoanCount = res.data.enterLoanCount ? res.data.enterLoanCount : ''
        this.formData.enterLoanMechCount = JSON.parse(res.data.enterLoanMechCount ? res.data.enterLoanMechCount : '')
        this.formData.assetDeptRate = res.data.assetDeptRate ? res.data.assetDeptRate : ''
        this.formData.phoneOnline = res.data.phoneOnline ? res.data.phoneOnline : ''
        this.formData.phoneReal = res.data.phoneReal ? res.data.phoneReal : '0'
        this.formData.reserveFundMonth = res.data.reserveFundMonth ? res.data.reserveFundMonth : ''
        this.formData.socialSecurityMonth = res.data.socialSecurityMonth ? res.data.socialSecurityMonth : ''
        this.formData.customerTag = res.data.customerTag ? res.data.customerTag : ''
        this.formData.clientStatus = res.data.clientStatus ? res.data.clientStatus : ''
        this.formData.remark = res.data.remark ? res.data.remark : ''
        this.formData.assets = JSON.parse(res.data.assets ? res.data.assets : '')
        this.formData.certificate = JSON.parse(res.data.certificate ? res.data.certificate : '')
        this.init()
      });
    }
  }
};
</script>

<style scoped lang="scss">
.el-step__title.is-success {
  color: #409EFF;
}

div {
  // margin-bottom: 20PX;
  font-weight: bold;
}

.el-card__body {
  padding: 0;
}

i {
  color: #333333;
  margin-right: 10px;
}

.baseInfo {
  margin: 10px;
}

/deep/ .el-textarea textarea {
  height: 100px;
}
</style>